package cn.edu.csust.coursecard.dao;

import cn.edu.csust.coursecard.dao.entity.StuInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

@Mapper
public interface StuInfoMapper {

    int insertSelective(StuInfo record);

    StuInfo selectByPrimaryKey(Integer id);

    StuInfo selectByStudentNum(String studentNum);

    int updateByPrimaryKeySelective(StuInfo record);

    String selectAvatar(Integer id);

    List<StuInfo> selectStuAvatarInvalid();

    void makeStuAvatarNull(StuInfo stuInfo);
    
    int selectLoginStuCount(Date time);

    /**
     * @param grade 当前最小的年级
     * @return
     */
    int solveNewStudentMistake(@Param("grade") String grade);


}